<?php

namespace common\models\base;

use Yii;

/**
 * This is the model class for table "{{%image_index}}".
 *
 * @property int $id
 * @property string $image_url
 * @property int $created_at
 * @property int $updated_at
 * @property string $target_path
 * @property string $target_dir_pre
 * @property int $type
 */
class ImageIndex extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%image_index}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['image_url', 'created_at', 'updated_at', 'target_path'], 'required'],
            [['created_at', 'updated_at', 'type'], 'integer'],
            [['image_url', 'target_path', 'target_dir_pre'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'image_url' => Yii::t('app', 'Image Url'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'target_path' => Yii::t('app', 'Target Path'),
            'target_dir_pre' => Yii::t('app', 'Target Dir Pre'),
            'type' => Yii::t('app', 'Type'),
        ];
    }
}
